/*===========================================================================+
 |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
 |                         All rights reserved.                              |
 +===========================================================================+
 |  HISTORY                                                                  |
 +===========================================================================*/
package sza.oracle.apps.ap.oie.print.webui;


import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.Serializable;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
import oracle.apps.xdo.oa.common.DocumentHelper;
import sza.oracle.apps.ap.oie.print.server.PrintHeaderVOImpl;

/**
 * Controller for ...
 */
public class ExpenseReportHisCO extends OAControllerImpl
{
  public static final String RCS_ID="$Header$";
  public static final boolean RCS_ID_RECORDED =
        VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
 

  /**
   * Layout and page setup logic for a region.
   * @param pageContext the current OA page context
   * @param webBean the web bean corresponding to the region
   */
  public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
      
  }

  /**
   * Procedure to handle form submissions for form elements in
   * a region.
   * @param pageContext the current OA page context
   * @param webBean the web bean corresponding to the region
   */
  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
  
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("GetRecBtn")!=null){
         
          String INVOICE_NUM = pageContext.getParameter("ReportHeaderIdInput");
          String EXPENSE_STATUS_CODE = pageContext.getParameter("StatusInput");
          String WEEK_END_DATE  = pageContext.getParameter("ReportDateInput");
          String WEEK_END_DATE_To = pageContext.getParameter("ReportDateTo");
          
          String REPORT_SUBMITTED_DATE = pageContext.getParameter("SubmitDateInput");
          String REPORT_SUBMITTED_DATE_To = pageContext.getParameter("SubmitDateTo");
          String employee_id = pageContext.getParameter("SubmitPersonId");
          
          String entered_date = pageContext.getParameter("entered_date");
          String entered_date_To = pageContext.getParameter("entered_date_To");

    

          Serializable[] parameters = { employee_id,INVOICE_NUM, WEEK_END_DATE,WEEK_END_DATE_To,REPORT_SUBMITTED_DATE,REPORT_SUBMITTED_DATE_To,EXPENSE_STATUS_CODE,entered_date,entered_date_To};
          am.invokeMethod("getHisRecord",parameters);
      }  
  }
}
